package com.application.magazine;

import java.util.List;

import com.roscopeco.ormdroid.Entity;

public class Images extends Entity{
	  public int id;
	  public String path;
	  public Magazine magazine;
	  
	  public Images() {
		  this(null);
	  }



	public Images(String path) {
		this.path = path;
	  }



	public Images(String path, Magazine magazine) {
		this.path = path;
		this.magazine = magazine;
	}
	public int getPk(){
		List<Images> list = null;
		int key = 1;
		list = query(Images.class).executeMulti();
		if(list!=null && !list.isEmpty()){
			key = list.size()+1;
		}
		return key;
		
	}

}
